package com.lagou.java;

import com.sun.scenario.effect.impl.prism.ps.PPSBlend_MULTIPLYPeer;

import java.nio.channels.NonReadableChannelException;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import java.util.concurrent.ConcurrentSkipListSet;

public class aaa {
    public static void main(String[] args) {
        ServerInfo serverInfo = new ServerInfo();
        serverInfo.setHost("127.0.0.1");
        serverInfo.setPort(1234);
        ServerInfo address = new ServerInfo();
        address.setHost("127.0.0.1");
        address.setPort(1234);
        if (address.hashCode() == serverInfo.hashCode() && address.equals(serverInfo)) {
            System.out.println("xiangdeng");
        }
        Set<ServerInfo> serverInfos = Collections.synchronizedSet(new HashSet<>());
        serverInfos.add(address);
        serverInfos.add(serverInfo);
        System.out.println(serverInfos.size());
    }
}


